Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dockerfiles with OMPython for OMSimulator CI on Jenkins #6

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

AnHeuermann
Copy link
Member

The Build tag should be changed to some different.

These docker images are used on Jenkins for FMI Cross Checks of OMSimulator. OMPython is used for verification, pandas and git used in the Python scripts to run the actual test.

@AnHeuermann
Copy link
Member Author

@sjoelund Where do we want to upload the images to? Should they be public or private?

Also both Dockerfiles can probably be merged into one, but I'm not so sure how to do that.

&& apt-get clean

# Install OMC and OMPython
RUN for deb in deb deb-src; do echo "$deb http://build.openmodelica.org/apt focal stable"; done | tee /etc/apt/sources.list.d/openmodelica.list \
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should use a fixed version, like https://build.openmodelica.org/omc/builds/linux/releases/1.16.2/

But you could just use FROM openmodelica/openmodelica:v1.16.2-ompython instead, right? And only install pandas to it.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We could do that. Where is the dockerfile for that one saved? I think we should have them all in one place.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

https://github.com/OpenModelica/OpenModelicaDockerImages uses Docker Hub's settings to build from this repository's branches. It's pretty slow and error-prone though, and I want to eventually move it to Jenkins.

Comment on lines 39 to 43
RUN groupadd -g 1000 testUser \
&& useradd -m -r -u 1000 -g testUser testUser

USER testUser
ENV USER=testUser
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Users belong in the docker command, not the image (in particular the id)

@lochel lochel self-assigned this Jul 6, 2021
@AnHeuermann
Copy link
Member Author

This PR is a bit stuck, but we should backup the Jenkinsfile that is currently running for the FMI-Cross-Checks for OMSimulator. I'm not sure how I need to change the Dockerfiles in this PR so it can be merged.

@sjoelund Could you make some concrete suggestions?

@AnHeuermann
Copy link
Member Author

It's not perfect, but I updated the Dockerfiles to not create a user group. We should merge this, as it now used by Jenkins for a long time and we need some back-up of the scripts.

@sjoelund
Copy link
Member

Why does it use 4 layers (run commands) in the dockerfiles. If you have too many layers you can get some warnings.

@AnHeuermann
Copy link
Member Author

It's faster to re-build when changing one of the later layers. But I changed it to be in (mostly) one layer.

@CLAassistant
Copy link

CLAassistant commented Oct 5, 2023

CLA assistant check
All committers have signed the CLA.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants